# $Id: PKGBUILD 85751 2013-03-06 08:42:03Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=python2-grequests
pkgver=0.2.0
pkgrel=1
_libname=${pkgname/python2-/}
pkgdesc="Allows you to use Requests with Gevent to make asyncronous HTTP Requests easily."
url="http://crate.io/packages/grequests/"
depends=('python2-requests' 'python2-gevent')
makedepends=('python2-distribute')
license=('custom: ISC')
arch=('any')
source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz https://github.com/kennethreitz/grequests/raw/master/LICENSE)

build() {
    cd "$srcdir/$_libname-$pkgver"
	find -type f -exec sed -i '1 s|python$|python2|' {} +
    python2 setup.py build
}

package() {
    cd "$srcdir/$_libname-$pkgver"
    python2 setup.py install --skip-build -O1 --root="$pkgdir"
	install -m0644 -D "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha256sums=('acec39d0fe996303557c9e6fb8ceef5af2714afe314fd0894770bd58bafa4e51'
            '4063882a8913e4b37457d58fe6600bd975ba053c8db2e8c6b218e7c9c8575ca8')
